/// 设计 角色初始就拥有所buffer 但是 using = false
///
///
module.exports = {
    //
    buffer:[ 
    {//buffer 0 隐身效果
        using : false,
        leftTime: 0,
        allTime : 1,
        effectValue :0,
        update(dDime)
        {
            if(this.using == false)
             return;

             this.leftTime = this.leftTime - dDime;
            if(this.leftTime <= 0 )
            {
              this. end();
            }
        },
        start()
        {
            this.allTime = this.effectValue;
            this.using = true;
            this.leftTime = this.allTime;
            
            
        },
        
        end()
        {
            this.using = false;
            this.leftTime = 0;
        },
        
    },

     {//buffer 1 //%10吞噬
        using : false,
        leftTime : 0,
        allTime : 3,
        effectValue :0,
        update(dDime)
        {
            if(this.using == false)
             return;

            // this.leftTime = this.leftTime - this.dDime;
            if(this.leftTime <= 0 )
            {
                this.end();
            }
        },
        start()
        {
            this.using = true;
            this.leftTime = this.allTime;
        },
        
        end()
        {
            this.using = false;
            this.leftTime = 0;
        },
        
    },

     {//buffer 2格挡伤害
        using : false,
        leftTime : 0,
        allTime : 3,
        effectValue :0,
        update(dDime)
        {
            if(this.using == false)
             return;

            // this.leftTime = this.leftTime - this.dDime;
            if(this.leftTime <= 0 )
            {
                this.end();
            }
        },
        start()
        {
            this.using = true;
            this.leftTime = this.allTime;
        },
        
        end()
        {
            this.using = false;
            this.leftTime = 0;
        },
        
    },

]
}